/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package racer.client.gui.entities;

import java.awt.Color;
import racer.client.gui.*;

/**
 *
 * @author Piet
 */
public class CarEntity extends Entity {

    private Game game;
    private int carid;
    private int angle;

    public CarEntity(Game game, int carid,int x, int y, Color color) {
        super(x, y,carid);
        this.game = game;
        this.color = color;
        this.angle=0;
    }


     /**
     * Beweegt de Entity horizontaal, rekening houdend met de grenzen van 
     * het scherm
     */
    @Override
    public void moveX(long delta) {

        if ((dx < 0) && (x < 10)) {
            return;
        }

        if ((dx > 0) && (x > 1014)) {
            return;
        }
        super.moveX(delta);
    }

    /**
     * Beweegt de Entity verticaal, rekening houdend met de grenzen van 
     * het scherm
     */
    @Override
    public void moveY(long delta) {

        if ((dy < 0) && (y < 10)) {
            return;
        }

        if ((dy > 0) && (y > 758)) {
            return;
        }
        super.moveY(delta);
    }
    

}
